home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SPX30.ZIP / DEMO12.ZIP / DEMO12.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-06-14  |  1.0 KB  |  45 lines

  1. Program Demo12;
  2.  
  3. { SPX library - font demo Copyright 1994 Scott D. Ramsay  }
  4.  
  5. Uses spx_vga,spx_sfn,spx_lib;
  6.  
  7. var
  8.   lib   : pSpxLib;
  9.   dac   : rgblist;
  10.   font1,
  11.   font2,
  12.   font3 : sfn_type;
  13. begin
  14.   openmode(1);
  15.   { open an archive file that has some fonts }
  16.   lib := new(pSpxLib,init('fonts.spl',true));
  17.  
  18.   { load up a palette }
  19.   loadcolors('demo12.col',dac);
  20.   fsetcolors(dac);
  21.  
  22.   { load some fonts from the archive }
  23.   LoadSfnLib(lib,'scifi.sfn',font1);
  24.   LoadSfnLib(lib,'west.sfn',font2);
  25.  
  26.   { load a font from disk }
  27.   LoadSfn('mono8.sfn',font3);
  28.  
  29.   putletter(10,10,55,'This is the default font');
  30.   SetSfn(font1);
  31.   putletter(10,18,24,'This is scifi font');
  32.   printletter(10,28,'This is scifi font using it''s colors');
  33.   SetSfn(font2);
  34.   putletter(10,40,55,'This is west font');
  35.   putletter(10,50,65,'This is west font');
  36.   SetSfn(font3);
  37.   putletter(10,100,100,'This font is MONO8');
  38.   readln;
  39.   FreeSfn(font1);
  40.   FreeSfn(font2);
  41.   FreeSfn(font3);
  42.   dispose(lib,done);
  43.   closemode;
  44. end.
  45.